import * as THREE from "three";

const initScene = (content) => {
  const { scene, camera, renderer } = content
  // 平行光1
  const directionalLight = new THREE.DirectionalLight(0xffffff, 0.6);
  directionalLight.position.set(400, 200, 300);
  scene.add(directionalLight);
  // 平行光2
  const directionalLight2 = new THREE.DirectionalLight(0xffffff, 0.6);
  directionalLight2.position.set(-400, -200, -300);
  scene.add(directionalLight2);
  //环境光
  const ambient = new THREE.AmbientLight(0xffffff, 0.6);
  scene.add(ambient);

  // 创建坐标系
  const axisHelper = new THREE.AxesHelper(250);
  scene.add(axisHelper);

  // 底部栅格
  const gridHelper = new THREE.GridHelper(600, 50);
  gridHelper.position.y = -0.1;
  scene.add(gridHelper);
}

export default initScene;
